SharePoint Foundation 2010 provides a basic
search that allows it to crawl only SharePoint sites in the same farm;
that is, search cannot be configured to crawl external data sources. You
cannot manually configure search crawling of a SharePoint Foundation
farm, and search queries are scoped to a single site collection.
However, SharePoint Foundation also includes the Help Search service,
which can be managed. This service indexes the help system. The four
search-related Windows PowerShell cmdlets in SharePoint Foundation (and
in SharePoint Server) are
You can use the Get-Help
cmdlet with the name of a specific cmdlet to get a description of the
cmdlet, the syntax it uses, parameter descriptions, examples, and other
information. The properties associated with the SharePoint Foundation
Help Search service can be listed by piping into the select * command,
as shown in the following example.
Get-SPSearchService | select *
Sample output generated by this command is shown here.
ServiceName : SPSearch4
PerformanceLevel : PartlyReduced
TypeName : SharePoint Foundation Help Search
Required : True
AddStartAddressForNonNTZone : False
MaxBackupDuration : 2880
ProcessIdentity : SPProcessIdentity
Instances : {, }
Applications : {}
JobDefinitions : {SharePoint Foundation Search Refresh}
RunningJobs : {}
JobHistoryEntries : {, , , ...}
CanUpgrade : True
IsBackwardsCompatible : True
NeedsUpgradeIncludeChildren : False
NeedsUpgrade : False
UpgradeContext : Microsoft.SharePoint.Upgrade.SPUpgradeContext
Name : SPSearch4
DisplayName : SPSearch4
Id : 5f19c104-c5e6-4d06-9131-22b38afca689
Status : Online
Parent : SPFarm Name=SPF_Config
Version : 3081
Properties : {}
Farm : SPFarm Name=SPF_Config
UpgradedPersistedProperties : {}
By reviewing the properties, the relationship between the SPSearch4
service and other objects can be found. Therefore, one object can point
to another object—for example, one of the properties of the Search
service is JobDefinitions, which contains a list of any SharePoint timer
jobs that are associated with this service.
(Get-SPSearchService).jobdefinitions | select *
Look at the sample output
from this command shown here. There is only one timer job associated
with this service, and by reviewing its properties, you can see that it
is configured to run hourly to keep the help index synchronized with its
content.
DisplayName : SharePoint Foundation Search Refresh
Description : Performs periodic synchronization functions for
the Microsoft SharePoint Foundation search service
.
Service : SPSearchService Name=SPSearch4
WebApplication :
Server :
LockType : None
Schedule : hourly between 4 and 4
Title : SharePoint Services Search Refresh
LastRunTime : 01/01/2010 16:04:00
Retry : False
IsDisabled : False
VerboseTracingEnabled : False
HistoryEntries : {, , , ...}
EnableBackup : False
DiskSizeRequired : 0
CanSelectForBackup : False
CanRenameOnRestore : False
CanSelectForRestore : False
Name : SharePoint Foundation Search Refresh
TypeName : Microsoft.SharePoint.Search.Administration.SPSear
chJobDefinition
Id : ced11b3b-470c-4d40-91a6-7f831dae8f79
Status : Online
Parent : SPSearchService Name=SPSearch4
Version : 3115
Properties : {}
Farm : SPFarm Name=SPF_Config
UpgradedPersistedProperties : {}N
Note:
The SharePoint Foundation Search Refresh timer job is the same as any other timer job and can be configured using the SPTimerJob cmdlet. For example, to schedule the timer job to run daily between specific times, type the following command.
Set-SPTimerJob "SharePoint Foundation Search Refresh"
-Schedule "daily between 01:00:00 and 04:00:00"
By using similar commands,
your familiarity with the objects that the SharePoint cmdlets expose
will increase. Comparing information you can obtain using cmdlets to the
experience of using the SharePoint 2010 Central Administration website
can quickly make you familiar with the cmdlets. For example, to obtain
more information about the Search service, type Get-SPSearchServiceInstance | select *.
Sample output from this command is shown here and lists information
such as the SQL Server where the search database is stored and the
location of the index. Therefore, these properties are readily available
within the Windows PowerShell environment to aid you in automating
administrative tasks.
TypeName : SharePoint Foundation Help Search
SystemService : False
DisplayName : Serve search queries over help content
Description : Serve search queries over help content
ManageLink : Microsoft.SharePoint.Administration.SPActionLink
ProvisionLink : Microsoft.SharePoint.Administration.SPActionLink
UnprovisionLink : Microsoft.SharePoint.Administration.SPActionLink
ProxyType : Default
WebProxy : System.Net.WebProxy
IndexLocation : C:\Program Files\Common Files\Microsoft Shared\
Web Server Extensions\14\Data\Applications
SearchDatabase : SPSearchDatabase Name=SPF_SearchService_WIN08R2
Server : SPServer Name=w08r2spf
Service : SPSearchService Name=SPSearch4
Instance :
Roles :
Hidden : False
CanUpgrade : True
IsBackwardsCompatible : True
NeedsUpgradeIncludeChildren : False
NeedsUpgrade : False
UpgradeContext : Microsoft.SharePoint.Upgrade.SPUpgradeContext
Name :
Id : 8af8b8b1-92cb-48d2-8864-20a7e191d7c2
Status : Online
Parent : SPServer Name=w08r2spf
Version : 3067
Properties : {}
Farm : SPFarm Name=SPF_Config
UpgradedPersistedProperties : {}
This same information can be
obtained using the SharePoint 2010 Central Administration website. Click
Manage Services On Server and then click the SharePoint Foundation Help
Search hyperlink, as shown in Figure 1.
Note:
When you have to complete a task more than once, you should think about using Windows PowerShell to automate the task.